/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package ar.edu.utn.frsf.cidisi.upcolbpip.impl;

import ar.edu.utn.frsf.cidisi.upcolbpip.UPColBPIPModel;
import ar.edu.utn.frsf.cidisi.upcolbpip.UpcolbpipFactory;
import ar.edu.utn.frsf.cidisi.upcolbpip.UpcolbpipPackage;

import ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.B2bcollaborationsPackage;

import ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.impl.B2bcollaborationsPackageImpl;

import ar.edu.utn.frsf.cidisi.upcolbpip.businessinterfaces.BusinessinterfacesPackage;

import ar.edu.utn.frsf.cidisi.upcolbpip.businessinterfaces.impl.BusinessinterfacesPackageImpl;

import ar.edu.utn.frsf.cidisi.upcolbpip.collaborativebusinessprocesses.CollaborativebusinessprocessesPackage;

import ar.edu.utn.frsf.cidisi.upcolbpip.collaborativebusinessprocesses.impl.CollaborativebusinessprocessesPackageImpl;

import ar.edu.utn.frsf.cidisi.upcolbpip.interactionprotocols.InteractionprotocolsPackage;

import ar.edu.utn.frsf.cidisi.upcolbpip.interactionprotocols.impl.InteractionprotocolsPackageImpl;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;

import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class UpcolbpipPackageImpl extends EPackageImpl implements UpcolbpipPackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass upColBPIPModelEClass = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see ar.edu.utn.frsf.cidisi.upcolbpip.UpcolbpipPackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private UpcolbpipPackageImpl() {
		super(eNS_URI, UpcolbpipFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
	 * 
	 * <p>This method is used to initialize {@link UpcolbpipPackage#eINSTANCE} when that field is accessed.
	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static UpcolbpipPackage init() {
		if (isInited) return (UpcolbpipPackage)EPackage.Registry.INSTANCE.getEPackage(UpcolbpipPackage.eNS_URI);

		// Obtain or create and register package
		UpcolbpipPackageImpl theUpcolbpipPackage = (UpcolbpipPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof UpcolbpipPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new UpcolbpipPackageImpl());

		isInited = true;

		// Obtain or create and register interdependencies
		InteractionprotocolsPackageImpl theInteractionprotocolsPackage = (InteractionprotocolsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InteractionprotocolsPackage.eNS_URI) instanceof InteractionprotocolsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionprotocolsPackage.eNS_URI) : InteractionprotocolsPackage.eINSTANCE);
		CollaborativebusinessprocessesPackageImpl theCollaborativebusinessprocessesPackage = (CollaborativebusinessprocessesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CollaborativebusinessprocessesPackage.eNS_URI) instanceof CollaborativebusinessprocessesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CollaborativebusinessprocessesPackage.eNS_URI) : CollaborativebusinessprocessesPackage.eINSTANCE);
		B2bcollaborationsPackageImpl theB2bcollaborationsPackage = (B2bcollaborationsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(B2bcollaborationsPackage.eNS_URI) instanceof B2bcollaborationsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(B2bcollaborationsPackage.eNS_URI) : B2bcollaborationsPackage.eINSTANCE);
		BusinessinterfacesPackageImpl theBusinessinterfacesPackage = (BusinessinterfacesPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(BusinessinterfacesPackage.eNS_URI) instanceof BusinessinterfacesPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(BusinessinterfacesPackage.eNS_URI) : BusinessinterfacesPackage.eINSTANCE);

		// Create package meta-data objects
		theUpcolbpipPackage.createPackageContents();
		theInteractionprotocolsPackage.createPackageContents();
		theCollaborativebusinessprocessesPackage.createPackageContents();
		theB2bcollaborationsPackage.createPackageContents();
		theBusinessinterfacesPackage.createPackageContents();

		// Initialize created meta-data
		theUpcolbpipPackage.initializePackageContents();
		theInteractionprotocolsPackage.initializePackageContents();
		theCollaborativebusinessprocessesPackage.initializePackageContents();
		theB2bcollaborationsPackage.initializePackageContents();
		theBusinessinterfacesPackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theUpcolbpipPackage.freeze();

  
		// Update the registry and return the package
		EPackage.Registry.INSTANCE.put(UpcolbpipPackage.eNS_URI, theUpcolbpipPackage);
		return theUpcolbpipPackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getUPColBPIPModel() {
		return upColBPIPModelEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getUPColBPIPModel_Name() {
		return (EAttribute)upColBPIPModelEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getUPColBPIPModel_B2bCollaboration() {
		return (EReference)upColBPIPModelEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getUPColBPIPModel_BusinessDocumentOntology() {
		return (EAttribute)upColBPIPModelEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getUPColBPIPModel_ContentLanguage() {
		return (EAttribute)upColBPIPModelEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getUPColBPIPModel_LanguageActionLibrary() {
		return (EAttribute)upColBPIPModelEClass.getEStructuralFeatures().get(4);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public UpcolbpipFactory getUpcolbpipFactory() {
		return (UpcolbpipFactory)getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create classes and their features
		upColBPIPModelEClass = createEClass(UP_COL_BPIP_MODEL);
		createEAttribute(upColBPIPModelEClass, UP_COL_BPIP_MODEL__NAME);
		createEReference(upColBPIPModelEClass, UP_COL_BPIP_MODEL__B2B_COLLABORATION);
		createEAttribute(upColBPIPModelEClass, UP_COL_BPIP_MODEL__BUSINESS_DOCUMENT_ONTOLOGY);
		createEAttribute(upColBPIPModelEClass, UP_COL_BPIP_MODEL__CONTENT_LANGUAGE);
		createEAttribute(upColBPIPModelEClass, UP_COL_BPIP_MODEL__LANGUAGE_ACTION_LIBRARY);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Obtain other dependent packages
		InteractionprotocolsPackage theInteractionprotocolsPackage = (InteractionprotocolsPackage)EPackage.Registry.INSTANCE.getEPackage(InteractionprotocolsPackage.eNS_URI);
		CollaborativebusinessprocessesPackage theCollaborativebusinessprocessesPackage = (CollaborativebusinessprocessesPackage)EPackage.Registry.INSTANCE.getEPackage(CollaborativebusinessprocessesPackage.eNS_URI);
		B2bcollaborationsPackage theB2bcollaborationsPackage = (B2bcollaborationsPackage)EPackage.Registry.INSTANCE.getEPackage(B2bcollaborationsPackage.eNS_URI);
		BusinessinterfacesPackage theBusinessinterfacesPackage = (BusinessinterfacesPackage)EPackage.Registry.INSTANCE.getEPackage(BusinessinterfacesPackage.eNS_URI);

		// Add subpackages
		getESubpackages().add(theInteractionprotocolsPackage);
		getESubpackages().add(theCollaborativebusinessprocessesPackage);
		getESubpackages().add(theB2bcollaborationsPackage);
		getESubpackages().add(theBusinessinterfacesPackage);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes

		// Initialize classes and features; add operations and parameters
		initEClass(upColBPIPModelEClass, UPColBPIPModel.class, "UPColBPIPModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getUPColBPIPModel_Name(), ecorePackage.getEString(), "name", null, 0, 1, UPColBPIPModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getUPColBPIPModel_B2bCollaboration(), theB2bcollaborationsPackage.getB2BCollaboration(), null, "b2bCollaboration", null, 1, 1, UPColBPIPModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getUPColBPIPModel_BusinessDocumentOntology(), ecorePackage.getEString(), "businessDocumentOntology", null, 0, 1, UPColBPIPModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getUPColBPIPModel_ContentLanguage(), ecorePackage.getEString(), "contentLanguage", null, 0, 1, UPColBPIPModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getUPColBPIPModel_LanguageActionLibrary(), ecorePackage.getEString(), "languageActionLibrary", null, 0, 1, UPColBPIPModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		// Create resource
		createResource(eNS_URI);
	}

} //UpcolbpipPackageImpl
